import { HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { Brand } from '../model/brand';
import { PaginationList } from '../model/message';
import { CommonApi } from './commonApi';
import { RequestService } from './request.service';

@Injectable({
  providedIn: 'root'
})
export class BrandApiService extends CommonApi<Brand>{

  constructor(
    private request: RequestService,
  ) {
    super(request, '/brand');
  }

  public fetchAllBrand(): Observable<Array<Brand>> {
    const url = '/brand/listAll';
    return this.request.get<Array<Brand>>(url, null);
  }

  public updateShowStatus(data): Observable<any> {
    const url = '/brand/update/showStatus';
    return this.request.post(url, data);
  }
  public updataFactoryStatus(data): Observable<any> {
    const url = '/brand/update/factoryStatus';
    return this.request.post(url, data);
  }
}
